﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="GAME">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="WINDOW">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="WIDTH" type="xs:unsignedShort" />
              <xs:element name="HEIGHT" type="xs:unsignedShort" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="LIST_TEXTURES">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="TEXTURE">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="frameWidth" type="xs:unsignedShort" use="required" />
                      <xs:attribute name="frameHeight" type="xs:unsignedShort" use="required" />
                      <xs:attribute name="numberOfFramePerRow" type="xs:unsignedShort" use="required" />
                      <xs:attribute name="numberOfFrame" type="xs:unsignedShort" use="required" />
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="LIST_FONT">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FONT">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="frameWidth" type="xs:unsignedShort" use="required" />
                      <xs:attribute name="frameHeight" type="xs:unsignedShort" use="required" />
                      <xs:attribute name="numberOfFramePerRow" type="xs:unsignedShort" use="required" />
                      <xs:attribute name="numberOfFrame" type="xs:unsignedShort" use="required" />
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="LIST_SOUNDS">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="SOUND" type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AI">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="LEVEL">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="WAVES">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="WAVE">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element maxOccurs="unbounded" name="WAYPOINT">
                                  <xs:complexType>
                                    <xs:attribute name="x" type="xs:short" use="required" />
                                    <xs:attribute name="y" type="xs:short" use="required" />
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="numberOfEnemies" type="xs:unsignedShort" use="required" />
                              <xs:attribute name="typeOfEnemies" type="xs:unsignedShort" use="required" />
                              <xs:attribute name="timeToSpawn" type="xs:unsignedShort" use="required" />
                              <xs:attribute name="timeToLive" type="xs:unsignedShort" use="required" />
                              <xs:attribute name="timeBetweenEnemies" type="xs:unsignedShort" use="required" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="BOSS">
                      <xs:complexType>
                        <xs:attribute name="projectileTypeLeft" type="xs:unsignedShort" use="required" />
                        <xs:attribute name="projectileTypeRight" type="xs:unsignedShort" use="required" />
                        <xs:attribute name="timeToSpawn" type="xs:unsignedShort" use="required" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="numberOfWave" type="xs:unsignedShort" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>